import {Injectable} from '@angular/core';
import {HttpService} from '@kylin/http';

@Injectable()

export class AuthorizationService {
    constructor(private http: HttpService) {
    };

    getPermissions(roleId) {
        return this.http.get('/permissionsTree/', {roleId});
    }


    subUpDate(roleId, permissionIds) {
        return this.http.post('/rolePermissions', {roleId: roleId, permissionIds: permissionIds})
    }
}
